﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;

namespace WebBarracoDoSom.Models
{
    public class InstrumentoInitializer : DropCreateDatabaseIfModelChanges<InstrumentoDBContext>
    {
        protected override void Seed(InstrumentoDBContext context)
        {
            var instrumentos = new List<Instrumento> {  new Instrumento { ID = 1, 
                                                                            Categoria_ID = 0,
                                                                            Foto = "",
                                                                            Nome = "",
                                                                            Marca = "", 
                                                                            Descricao = "",
                                                                            Preco = 0 } };


            instrumentos.ForEach(i => context.Instrumentos.Add(i));
        }
    }
}